package com.cf.message.model;

import com.cf.code.core.CField;
import com.cf.code.core.CModel;
import com.cf.code.core.CPage;
import com.cf.crud.entity.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * boot-message-SmsEntity
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/7/25 下午 06:18
 */
@Entity
@Table(name = "smsSendLog")
@CModel(pages = {@CPage(title = "短信发送列表", path = "smsSendLog", templateName = "list.ftl", outPutName = "list.ftl")})
public class SmsSendLog extends BaseEntity {

    @CField(lab = "接收手机号", search = true)
    private String phone;

    @CField(lab = "发送数据")
    private String data;

    @CField(lab = "结果代码")
    @Column(name = "resultCode")
    private String resultCode;

    @CField(lab = "错误原因")
    @Column(name = "errorReason")
    private String errorReason;

    @CField(lab = "发送时间")
    @Column(name = "sendDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date sendDate = new Date();

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getErrorReason() {
        return errorReason;
    }

    public void setErrorReason(String errorReason) {
        this.errorReason = errorReason;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public Date getSendDate() {
        return sendDate;
    }

    public void setSendDate(Date sendDate) {
        this.sendDate = sendDate;
    }
}
